home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_riv_ambwaterflow1.cog < prev    next >
Text File  |  1999-11-15  |  1KB  |  58 lines

  1. # Jones 3D Cog Script
  2. #
  3. # RIV_AmbWaterFlow1.cog
  4. #
  5. # [TRM]
  6. #
  7. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  8. # ========================================================================================
  9.  
  10. symbols
  11.  
  12.     message     entered
  13.     
  14.     thing       ambientPos
  15.     
  16.     sector      sec_On1     linkID=1
  17.     sector      sec_On2     linkID=1
  18.     
  19.     sector      sec_Off1    linkID=0
  20.     sector      sec_Off2    linkID=0
  21.  
  22.     sound       snd_Water
  23.     
  24.     int         looping     local
  25.     int         playing=0   local
  26.     
  27.     flex        vol=0.5
  28.     flex        min=8.0
  29.     flex        max=15.0
  30.     
  31. end
  32.  
  33. # ========================================================================================
  34.  
  35. code
  36.  
  37. entered:
  38.  
  39.     if((GetSenderID() == 1) && (playing == 0))
  40.     {
  41.         playing = 1;
  42.         Sleep(Rand());
  43.         looping = PlaySoundThing(snd_Water, ambientPos, vol, min, max, 0x0001);
  44.     }
  45.  
  46.     if((GetSenderID() == 0) && (playing == 1))
  47.     {
  48.         playing = 0;
  49.         StopSound(looping, 0.0);
  50.     }
  51.     
  52.     return;
  53.  
  54. # ========================================================================================
  55.  
  56. end
  57.  
  58.